<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录页面</title>
</head>
<body>
    <div>
        <h1>这是登录页面</h1>
    </div>
    <div>
        <form method="post">
            {% csrf_token %}
            <label for="username">用户名称:</label>
            <input type="text" name="username" id="username" required></input> <br>
            <label for="password">密码:</label>
            <input type="password" name="password" id="password" required></input><br>
            <input type="submit" value="登录"></input>
        </form>
        {% if error %}
            <p style="color: red;">{{ error }}</p>
        {% endif %}
        <p>或</p>
        <a href="{% url 'register' %}">注册</a>
    </div>
</body>
</html>